<form id="merchantFinduserseditfm<?php echo $uniqid;?>" method="post" style="padding: 8px;">
    <table border="0" width="100%" cellspacing="1" cellpadding="5" class="formtable">
        <tr bgcolor="#FFFFFF">
            <td  class="tlabel"   width="20%">用户名：</td>
            <td width="80%">
                <el-tag v-if="params.member_id"
                        :key="params.id"
                        :closable="false"
                        size="medium">
                    {{params.member.nickname}}({{params.member.phone}})
                </el-tag>
            </td>
        <tr bgcolor="#FFFFFF">
            <td  class="tlabel" width="20%">角色：</td>
            <td width="80%">
                <SELECT v-model='params.roles_id' style="width:153px; height:25px;border: 1px solid #065dc7" size='1' class="forminput inputstyle">
                    <OPTION :value="item.id" v-for="item of roles">{{item.name}}</OPTION>
                </SELECT>
            </td>
        </tr>
    </table>
</form>
<script>
    var merchantUserAddVm = new Vue({
        el: '#merchantFinduserseditfm<?php echo $uniqid;?>',
        data: {
            params:JSON.parse("<?php echo addslashes($dataset);?>"),
            roles: JSON.parse("<?php echo addslashes($roles);?>"),
        },
        mounted() {},
        methods: {
            init() {},
        }
    });
    $(function(){
        $('#dianpuUsersupdatesubmit').click(function(data){
            $.post('/merchant/system/usersedit', {id:merchantUserAddVm.params.id,roles_id:merchantUserAddVm.params.roles_id}, function(data){
                if(data.ret === 0){
                    $.messager.show({
                        title:'提示',
                        msg:data.msg,
                        timeout:3000,
                        showType:'slide'
                    });
                    $('#merchantFinduserseditfm<?php echo $uniqid;?>').form('clear');
                    $("#dianpuUsersdlg").dialog('close');
                    dianpuUsersReload();
                }else{
                    $.messager.alert('提示',data.msg,'warning');
                }
            });
        })
    });
</script>
